package com.zhuangjie.rider.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.zhuangjie.mvc.validator.valid.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *  骑手工作地点/常驻地点
 * </p>
 *
 * @author zhuangjie
 * @since 2024-01-08
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("rider_work_region")
@ApiModel(value = "RiderWorkRegion对象", description = "")
public class RiderWorkRegion implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("所属rider编号")
    @TableField("rider_id")
    private Long riderId;

    @ApiModelProperty("经度")
    @TableField("longitude")
    @NotNull(message = "经度不能为空",groups = {UpdateGroup.class})
    private Double longitude;

    @ApiModelProperty("纬度")
    @TableField("latitude")
    @NotNull(message = "纬度不能为空",groups = {UpdateGroup.class})
    private Double latitude;

    @ApiModelProperty("省份编码")
    @TableField("province_code")
    @NotBlank(message = "省份编码不能为空",groups = {UpdateGroup.class})
    private String provinceCode;

    @ApiModelProperty("省份名称")
    @TableField("province_name")
    @NotBlank(message = "省份名称不能为空",groups = {UpdateGroup.class})
    private String provinceName;

    @ApiModelProperty("城市编码")
    @TableField("city_code")
    @NotBlank(message = "城市编码不能为空",groups = {UpdateGroup.class})
    private String cityCode;

    @ApiModelProperty("城市名称")
    @TableField("city_name")
    @NotBlank(message = "城市名称不能为空",groups = {UpdateGroup.class})
    private String cityName;

    @ApiModelProperty("区县编码")
    @TableField("district_code")
    @NotBlank(message = "区县编码不能为空",groups = {UpdateGroup.class})
    private String districtCode;

    @ApiModelProperty("区县名称")
    @TableField("district_name")
    @NotBlank(message = "区县名称不能为空",groups = {UpdateGroup.class})
    private String districtName;

    @ApiModelProperty("详细地址信息")
    @TableField("detail_address")
    private String detailAddress;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
